import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Login from '@/components/Login'
import Index from '@/components/Index'
import Message from '@/components/Message'
import User from '@/components/User'
import Dormitory from '@/components/Dormitory'
import FeedBack from '@/components/FeedBack'
import Matriculate from '@/components/Matriculate'
import NewBorn from '@/components/NewBorn'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/index',
      name: 'Index',
      component: Index,
      redirect: '/helloword',
      children: [
        { path: '/helloword', component: HelloWorld },
        { path: '/message', component: Message },
        { path: '/user', component: User },
        { path: '/dormitory', component: Dormitory },
        { path: '/feedback', component: FeedBack },
        { path: '/matriculate', component: Matriculate },
        { path: '/newborn', component: NewBorn },
      ]
    }
  ]
})
